/*******************************************************************************
 * Copyright (c) 2011-2012 Olexandr V. Shaposhnikov.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    Olexandr V. Shaposhnikov - initial API and implementation and/or initial documentation
 *******************************************************************************/
package com.funkyroach.use.core.ast;

import org.eclipse.dltk.ast.ASTVisitor;
import org.eclipse.dltk.ast.expressions.Expression;

public class USDefaultProperty extends Expression {

    private USVarReference reference;
    private Expression value;

    @Override
    public int getKind() {
        return 0;
    }

    public void setReference(USVarReference reference) {
        this.reference = reference;
    }

    public void setValue(Expression value) {
        this.value = value;
    }

    public void traverse(ASTVisitor visitor) throws Exception {
        if (reference != null) {
            visitor.visit(reference);
        }

        if (value != null) {
            visitor.visit(value);
        }

        super.traverse(visitor);
    }
}
